package com.czl.module_service.viewmodel

import com.czl.base.base.BaseViewModel
import com.czl.base.base.MyApplication
import com.czl.base.binding.command.BindingAction
import com.czl.base.binding.command.BindingCommand
import com.czl.base.config.AppConstants
import com.czl.base.data.DataRepository
import com.czl.base.event.SingleLiveEvent

class ServiceViewModel(application: MyApplication, model: DataRepository) :
    BaseViewModel<DataRepository>(application, model) {

    val toastDoingEvnent:SingleLiveEvent<Void> = SingleLiveEvent()
    val btnToastCLick:BindingCommand<Void> = BindingCommand(BindingAction {
        toastDoingEvnent.call()
    })
    val btnWorkClick: BindingCommand<Void> = BindingCommand(BindingAction {
        startContainerActivity(AppConstants.Router.Work.F_WORK)
    })
    val btnCommunityClick:BindingCommand<Void> = BindingCommand(BindingAction {
        startContainerActivity(AppConstants.Router.Activities.F_ACTIVITIES_LIST)
    })
    val btnMoreKeeperClick: BindingCommand<Void> = BindingCommand(BindingAction {
        startContainerActivity(AppConstants.Router.Main.F_HOUSEKEEPERS)
    })
    val btnReportClick:BindingCommand<Void> = BindingCommand(BindingAction {
        startContainerActivity(AppConstants.Router.Report.F_REPORT_SUBMIT)
    })
    val btnNoticeClick:BindingCommand<Void> = BindingCommand(BindingAction {
        startContainerActivity(AppConstants.Router.Activities.F_ACTIVITIES_BULLETIN_LIST)
    })
    val btnParkClick:BindingCommand<Void> = BindingCommand(BindingAction {
        startContainerActivity(AppConstants.Router.Main.F_PARK_PAY_HOME)
    })
    val btnComplaintClick:BindingCommand<Void> = BindingCommand(BindingAction {
        startContainerActivity(AppConstants.Router.Complaint.F_COMPLAINT_SUBMIT)
    })

    val btnUserAppointmentFragment: BindingCommand<Void> = BindingCommand(BindingAction {
        startContainerActivity(AppConstants.Router.Work.F_WORK_DEVICE_USER_APPOINTMENT)
    })

    val btnTakeCareRecordFragment: BindingCommand<Void> = BindingCommand(BindingAction {
        startContainerActivity(AppConstants.Router.Work.F_WORK_TAKE_CARE_RECORD)
    })

    val btnHealthyNoticeClick:BindingCommand<Void> = BindingCommand(BindingAction {
        startContainerActivity(AppConstants.Router.Service.F_NOTICE)
    })
    val btnHealthReport:BindingCommand<Void> = BindingCommand(BindingAction {
        startContainerActivity(AppConstants.Router.Service.F_HEALTH_REPORT_LIST)
    })
    val btnPaymentClick:BindingCommand<Void> = BindingCommand(BindingAction {
        startContainerActivity(AppConstants.Router.Service.F_HOUSES_PAYMENT)
//        toastDoingEvnent.call()
    })
}